package com.cjg.lock;

public class demo01 {
    public static void main(String[] args) {
        phone phone = new phone();
        new Thread(()->{
            phone.qq();
        }).start();
    }
}
class phone{
    public synchronized void call(){
        System.out.println("call");
    }

    public synchronized void qq(){
        System.out.println("qq");
        call();
    }
}